package com.showde.shoppingmall.business;

import com.showde.shoppingmall.business.NetCallbackImplBase.Notify;
import com.showde.shoppingmall.netentity.ProductSearchEntity;
import com.showde.shoppingmall.netentity.ProductSearchEntity.FETCH_TYPE;

public class ProductFetchOnCriteriaBusiness extends BusinessBase {

	private String criteria;
	private FETCH_TYPE fetchType;

	public ProductFetchOnCriteriaBusiness(Notify notify, String criteria,
			FETCH_TYPE fetchType) {
		super(notify);
		this.criteria = criteria;
		this.fetchType = fetchType;
		prepare();
	}

	public ProductFetchOnCriteriaBusiness(Notify notify, FETCH_TYPE fetchType) {
		super(notify);
		this.fetchType = fetchType;
		prepare1();
	}

	@Override
	public void prepare() {
		this.netEntity = new ProductSearchEntity(criteria, fetchType);
	}

	public void prepare1() {
		this.netEntity = new ProductSearchEntity(fetchType);
	}

}
